Day23手写：

// 1.手写算法：https://leetcode-cn.com/problems/substring-with-concatenation-of-all-words

/**
 * @param {string} s
 * @param {string[]} words
 * @return {number[]}
 */
 var findSubstring = function(s, words) {
    let correct = {};
    for (let i = 0 ; i < words.length; i++) {
        correct[words[i]] = correct[words[i]] || 0;
        correct[words[i]] ++;
    }

    let ret = [];

    for (let start = 0; start < words[0].length; start ++) {
        let map = {};
        let len = words[0].length;
        for (let i = start; i < s.length;) {
            if (i + len > s.length) break;

            let tmp = s.slice(i, i + len);
            map[tmp] = map[tmp] || 0;
            map[tmp] ++;

            if (i - len * words.length >= 0) {
                let prev = s.slice(i - len * words.length, i - len * words.length + len);
                map[prev] = map[prev] || 0;
                map[prev] --;
            }


            let flag = true;
            for (let key in correct) {
                if (correct[key] !== map[key]) {
                    flag = false;
                    break;
                }
            }
            if (flag) {
                ret.push(i - (words.length - 1) * len);
            }
            i = i + len;
        }
    }

    return ret;
};

2.手写题:手写vuex新版和老版【继续完成】
